<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>{$person}</title>
    {include file="inset/head/head_css.tpl"}
    {include file="inset/head/head_js.tpl"}
</head>
<body>
    	
    <div class="b-popup none">
     <div class="b-popup-content">
	<div class="b-popup-header" align="right"><img id="close_popap" src="/static/img/toolbar/close-tab.png" width="20px"/></div>
        <form>
            <div class="new_client">
                <div><label>Логин:</label></div>	
                <div><input type="text" class="validate[required,custom[onlyLetterSp],minSize[3],maxSize[100]]" id="login" name="login"/></div>		
            </div>
            <div class="new_client">
                <div><label>Пароль:</label></div>	
                <div><input type="password" class="validate[required]" id="password" name="password"/></div>		
            </div>
            <div class="new_client">
                <div><label>Фамилия:</label></div>	
                <div><input type="text" class="validate[required,custom[onlyLetterSp],minSize[3],maxSize[100]]" id="name" name="name"/></div>		
            </div>
             <div class="new_client">
                <div><label>Имя:</label></div>	
                <div><input type="text" class="validate[required,custom[onlyLetterSp],minSize[3],maxSize[100]]" id="first_name" name="first_name"/></div>		
            </div>
            <div class="new_client">
                <div><label>Отчество:</label></div>	
                <div><input type="text" class="" id="second_name" name="second_name"/></div>		
            </div>
            <div class="new_client">
                <div><label>Права:</label></div>	
                <div>
                    <select  class="validate[required]" id="id_access" name="id_access">
                        <option value="1">Администратор</option>
                        <option value="2" selected>Менеджер</option>
                    </select>
                </div>		
            </div>
            <div class="access_submit">
               <input id="access_submit"  type="button" value="Сохранить"/>
            </div>
        </form>
      </div>
    </div>	
    <div class="wrapper">
        {include file="inset/header.tpl"}
        
        {include file="inset/menu/vermenu.tpl"}
	
        <div class="content">
	    <div class="navigation">
		<div class="settings_navigation">
                <ul>
                    <li>
                        <div id="access_button" class="button">
                            Новый пользователь	
                        </div>
                    </li>
                    <li>
                        <label>Настройки: </label>
                        <select id="settings" name="settings">
                            <option value="/settings/categories">Категории товара</option>
                            <option value="/settings/acc">Пользователи</option>
                            <option value="/settings/site">Сайты</option>
                        </select>
                    </li>
                    <li><input id="select_settings_button" type="button" value="Перейти"/></li>
                </ul>
		
		</div><!--client_navigation-->
	    </div><!--navigation-->
	    <table class="access_table" cellspacing="0" border="0" cellpadding="0">
	        <tr>
                    <th width="10%">
		        Логин   
                    </th>
	            <th width="8%">
		        Пароль
                    </th>
                    <th width="5%">
		        Права
                    </th>
                    <th width="15%">
		        Фамилия
                    </th>
                    <th width="15%">
		        Имя
                    </th>
                    <th width="15%">
		        Отчество
                    </th>
                    <th width="7%">
                        Удалить
                    </th>
		    <th width="10%">
		        Сохранить
		    </th>
	        </tr>
                {if isset($result)}
                {for $i=0 to $result|@count-1}
                <tr>
                    <td >
                         <form>
                            <input type="text" class="validate[required]" name="login" value="{$result.$i.login}"/>
                        </form>
                    </td>
                    <td>
                        <form>
                            <input type="text" class="validate[required]"  name="password" value="{$result.$i.password}"/>
                        </form>
                    </td>
                    <td align="center">
                        <select name="id_access">
                            {if $result.$i.id_access eq "1"}
                                <option value="1" selected>Администратор</option>
                                <option value="2">Менеджер</option>
                            {else}
                                <option value="1">Администратор</option>
                                <option value="2" selected>Менеджер</option>
                            {/if}
                        </select>
                       
                    </td>
                    <td >
                        <form>
                            <input type="text" class="validate[required]" name="name" value="{$result.$i.name}"/>
                        </form>
                    </td>
                    <td >
                        <form>
                            <input type="text" class="validate[required]" name="first_name" value="{$result.$i.first_name}"/>
                        </form>
                    </td>
                    <td>
                        <form>
                            <input type="text" class="" name="second_name" value="{$result.$i.second_name}"/>
                        </form>
                    </td>
                    <td align="center">
                        <a onclick='if (confirm("Удалить?")) {  window.location ="/settings/deleteperson/{$result.$i.id}";}' href="#" >Х</a>
                    </td>
                    <td align="center">
                        <div title="Сохранить" id="{$result.$i.id}" class="toolbar_button save person"></div>
                    </td>
                </tr>
		{/for}
                {/if}
	    </table>
	</div>
    </div>
    {include file="inset/footer.tpl"}
</body>
</html>
